Integrand size = 10, antiderivative size = 33 \[ \int x \cos ^2(x) \cot ^2(x) \, dx=-\frac {3 x^2}{4}-\frac {\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac {1}{2} x \cos (x) \sin (x) \]
[Out]
Time = 0.06 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {4493, 3391, 30, 3801, 3556} \[ \int x \cos ^2(x) \cot ^2(x) \, dx=-\frac {3 x^2}{4}-\frac {\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac {1}{2} x \sin (x) \cos (x) \]
[In]
[Out]
Rule 30
Rule 3391
Rule 3556
Rule 3801
Rule 4493
Rubi steps \begin{align*} \text {integral}& = -\int x \cos ^2(x) \, dx+\int x \cot ^2(x) \, dx \\ & = -\frac {1}{4} \cos ^2(x)-x \cot (x)-\frac {1}{2} x \cos (x) \sin (x)-\frac {\int x \, dx}{2}-\int x \, dx+\int \cot (x) \, dx \\ & = -\frac {3 x^2}{4}-\frac {\cos ^2(x)}{4}-x \cot (x)+\log (\sin (x))-\frac {1}{2} x \cos (x) \sin (x) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.00 \[ \int x \cos ^2(x) \cot ^2(x) \, dx=-\frac {3 x^2}{4}-\frac {1}{8} \cos (2 x)-x \cot (x)+\log (\sin (x))-\frac {1}{4} x \sin (2 x) \]
[In]
[Out]
Result contains complex when optimal does not.
Time = 2.53 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.82
method | result | size |
risch | \(-\frac {3 x^{2}}{4}+\frac {i \left (2 x +i\right ) {\mathrm e}^{2 i x}}{16}-\frac {i \left (-i+2 x \right ) {\mathrm e}^{-2 i x}}{16}-2 i x -\frac {2 i x}{{\mathrm e}^{2 i x}-1}+\ln \left ({\mathrm e}^{2 i x}-1\right )\) | \(60\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.36 \[ \int x \cos ^2(x) \cot ^2(x) \, dx=\frac {4 \, x \cos \left (x\right )^{3} - 12 \, x \cos \left (x\right ) - {\left (6 \, x^{2} + 2 \, \cos \left (x\right )^{2} - 1\right )} \sin \left (x\right ) + 8 \, \log \left (\frac {1}{2} \, \sin \left (x\right )\right ) \sin \left (x\right )}{8 \, \sin \left (x\right )} \]
[In]
[Out]
\[ \int x \cos ^2(x) \cot ^2(x) \, dx=\int x \cos ^{2}{\left (x \right )} \cot ^{2}{\left (x \right )}\, dx \]
[In]
[Out]
Exception generated. \[ \int x \cos ^2(x) \cot ^2(x) \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 206 vs. \(2 (27) = 54\).
Time = 0.30 (sec) , antiderivative size = 206, normalized size of antiderivative = 6.24 \[ \int x \cos ^2(x) \cot ^2(x) \, dx=-\frac {6 \, x^{2} \tan \left (\frac {1}{2} \, x\right )^{5} - 4 \, x \tan \left (\frac {1}{2} \, x\right )^{6} - 4 \, \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, x\right )^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{5} + 12 \, x^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 12 \, x \tan \left (\frac {1}{2} \, x\right )^{4} + \tan \left (\frac {1}{2} \, x\right )^{5} - 8 \, \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, x\right )^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right )^{3} + 6 \, x^{2} \tan \left (\frac {1}{2} \, x\right ) + 12 \, x \tan \left (\frac {1}{2} \, x\right )^{2} - 6 \, \tan \left (\frac {1}{2} \, x\right )^{3} - 4 \, \log \left (\frac {16 \, \tan \left (\frac {1}{2} \, x\right )^{2}}{\tan \left (\frac {1}{2} \, x\right )^{4} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, x\right ) + 4 \, x + \tan \left (\frac {1}{2} \, x\right )}{8 \, {\left (\tan \left (\frac {1}{2} \, x\right )^{5} + 2 \, \tan \left (\frac {1}{2} \, x\right )^{3} + \tan \left (\frac {1}{2} \, x\right )\right )}} \]
[In]
[Out]
Time = 24.45 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.70 \[ \int x \cos ^2(x) \cot ^2(x) \, dx=\ln \left ({\mathrm {e}}^{x\,2{}\mathrm {i}}-1\right )-{\mathrm {e}}^{-x\,2{}\mathrm {i}}\,\left (\frac {1}{16}+\frac {x\,1{}\mathrm {i}}{8}\right )+{\mathrm {e}}^{x\,2{}\mathrm {i}}\,\left (-\frac {1}{16}+\frac {x\,1{}\mathrm {i}}{8}\right )-\frac {3\,x^2}{4}-x\,2{}\mathrm {i}-\frac {x\,2{}\mathrm {i}}{{\mathrm {e}}^{x\,2{}\mathrm {i}}-1} \]
[In]
[Out]